package consts

import (
	"hotgo/internal/library/dict"
	"hotgo/internal/model"
)

func init() {
	dict.RegisterEnums("ExpressOptions", "快递公司选项", ExpressOptions)
	dict.RegisterEnums("ExpressStatusOptions", "快递状态选项", ExpressStatusOptions)
}

// 快递公司代码
const (
	ExpressNone = iota + 1 // 无物流
	ExpressNotSet
	ExpressSF
	ExpressEMS
	ExpressYTO
	ExpressSTO
	ExpressYD
	ExpressZTO
	ExpressBEST
	ExpressJT
	ExpressDEPPON
	ExpressJD
	ExpressOTHER
)

var ExpressSetList = []int{ExpressSF, ExpressEMS, ExpressYTO, ExpressSTO, ExpressYD, ExpressZTO, ExpressBEST, ExpressJT, ExpressDEPPON, ExpressJD, ExpressOTHER}

// ExpressOptions 快递公司选项
var ExpressOptions = []*model.Option{
	dict.GenInfoOption(ExpressNone, "无需物流"),
	dict.GenErrorOption(ExpressNotSet, "未发货"),
	dict.GenSuccessOption(ExpressSF, "顺丰"),
	dict.GenSuccessOption(ExpressEMS, "邮政"),
	dict.GenSuccessOption(ExpressYTO, "圆通"),
	dict.GenSuccessOption(ExpressSTO, "申通"),
	dict.GenSuccessOption(ExpressYD, "韵达"),
	dict.GenSuccessOption(ExpressZTO, "中通"),
	dict.GenSuccessOption(ExpressBEST, "百世"),
	dict.GenSuccessOption(ExpressJT, "极兔"),
	dict.GenSuccessOption(ExpressDEPPON, "德邦"),
	dict.GenSuccessOption(ExpressJD, "京东"),
	dict.GenSuccessOption(ExpressOTHER, "其它"),
}

const (
	ExpressStatusNot = iota + 1 // 未发货
	ExpressStatusYes            // 已发货
)

// ExpressStatusOptions 快递状态选项
var ExpressStatusOptions = []*model.Option{
	dict.GenErrorOption(ExpressStatusNot, "未发货"),
	dict.GenSuccessOption(ExpressStatusYes, "已发货"),
}
